package com.mars.module.admin.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mars.module.system.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 药品对象 sys_drug
 *
 * @author mars
 * @date 2024-04-11
 */

@Data
@ApiModel(value = "药品对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_drug")
public class SysDrug  {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 名称
     */
    @Excel(name = "名称")
    @ApiModelProperty(value = "名称")
    private String name;
    /**
     * 药物剂型
     */
    @Excel(name = "药物剂型")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "药物剂型")
    private Long drugType;

    @TableField(exist = false)
    @ApiModelProperty(value = "药物剂型名称")
    private String drugTypeName;
    /**
     * 药品规格
     */
    @Excel(name = "药品规格")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "药品规格")
    private Long drugSpecs;

    @TableField(exist = false)
    @ApiModelProperty(value = "药品规格名称")
    private String drugSpecsName;
    /**
     * 生产日期
     */
    @Excel(name = "生产日期")
    @ApiModelProperty(value = "生产日期")
    private LocalDate productDate;
    /**
     * 库存
     */
    @Excel(name = "库存")
    @ApiModelProperty(value = "库存")
    private String inventory;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;
}
